cc.Class({
    extends: cc.Component,

    properties: {
        Player:{
            default:null,
            type:cc.Node
        }
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {

    },

    update (dt) {
        this.node.rotation += dt * 20;
        if(Math.abs(this.Player.x)<1920) {
            this.node.x = this.Player.x;
        }
        else{
            this.node.x = 2000;
        }
        if(Math.abs(this.Player.y)<1920){
            this.node.y = this.Player.y;
        }
        else{
            this.node.y = 2000;
        }
    },
});
